﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using ToolBoxPro;
using System.Collections.Generic;
using LinqObj;

public partial class propose_form : RedirectPage
{
    public Vendor_Detail vendor;
    public Property property;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (PreviousPage != null && PreviousPage.Page is shoppingcart && PreviousPage.property!=null)
        {
            this.property = PreviousPage.property;
            this.vendor = PreviousPage.vendor;
            this.phOrderList.Controls.Add(PreviousPage.divOrderList);
            
            HtmlGenericControl div = new HtmlGenericControl("div");
            div = (HtmlGenericControl)PreviousPage.divOrderList;
            Session["orderlist"] = div.InnerText;
            
            this.lb_VendorDetail.Text = PreviousPage.vendor.VendorDetail;
            Session["vdetails"] = this.lb_VendorDetail.Text;
            
            this.lb_printDate.Text = DateTime.Now.ToString("d");
            Session["printdate"] = this.lb_printDate.Text;
            
            this.lb_VendorStatus.Text = property.VendorStatusLabel;
            Session["vstatus"] = this.lb_VendorStatus.Text;

            this.lb_PropertyInfo.Text = property.PropertyInfo;
            Session["propinfo"] = this.lb_PropertyInfo.Text;
        
        }
    }

    protected void back_bt_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/shoppingcart.aspx?pid=" + Request.QueryString["pid"].ToString());
    }

    //protected void print_bt_Click(object sender, EventArgs e)
    //{
    //    //Response.Redirect("~/print.aspx");
    //    Page.ClientScript.RegisterStartupScript(this.GetType(), "printscript", "window.open('print.aspx', 'printOrder', 'height = 600, width = 660, resizable = 0, scrollbars = 1'); ", true);
    //}
}
